
#include <iostream>

using namespace std;

class Integer {
public:
	Integer( int i ) : m_i( i ) {}
	bool opterator>(Integer const& that) const{
		return m_i > that.m_i;
	}
private:
	int m_i;
};

// Function template
template<typename T>
T Max( T x, T y ) {
	return x > y ? x : y;
}

int main( ) {
	Integer ix = 100, iy = 200;
	Max<Integer>( ix, iy );
	int nx = 10, ny = 20;
	cout << Max<int>( nx, ny ) << endl;

	double dx = 1.23, dy = 4.56;
	cout << Max<double>( dx, dy ) << endl;

	string sx = "world", sy = "hello";
	cout << Max<string>( sx, sy ) << endl;

	return 0;
}
